<?php
class OrdersModel extends Model {
	protected $tableName='orders';
	
	public function ordersbuydone($ordersid){
		$sql='select * from '.$this->tableName.' where orderid='.$ordersid;
		$res=mysql_query($sql) or die(mysql_error());
		$data=mysql_fetch_assoc($res);
		
		return $data;
	}
	
	public function order_list($mid){
		$sql='select * from '.$this->tableName.' where mid='.$mid;
		$res=mysql_query($sql) or die(mysql_error());
		$data=array();
		while ($row=mysql_fetch_assoc($res)) {
			$data[]=$row;
		}
		
		return $data;
	}
	
	
}
?>